﻿@model HexagonWeb.Models.SeatViewModel

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "购买";
}
<div class="panel panel-primary">
    <div class="panel-heading">
        <h4>购买</h4>
    </div>
    <div class="panel-body">
        @using (Html.BeginForm("Buyed", "Airline"))
        {
            @Html.AntiForgeryToken()
            <div class="form-horizontal">
                @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                @Html.HiddenFor(model => model.AirlineID)
                @Html.HiddenFor(model => model.Row)
                @Html.HiddenFor(model => model.Column)
                @Html.HiddenFor(model => model.Level)
                <div class="form-group">
                    <div class="col-md-2">等级</div>
                    <div class="col-md-3">
                        <b>
                            @if (Model.Level == 0)
                            {
                                <span>经济等级</span>
                            }
                            @if (Model.Level == 1)
                            {
                                <span>商业等级</span>
                            }
                            @if (Model.Level == 2)
                            {
                                <span>最高等级</span>
                            }
                        </b>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-2">座位行数</div>
                    <div class="col-md-3">
                        <b>
                            第
                            @Html.DisplayFor(model => model.Row)
                            行
                        </b>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-2">座位号码</div>
                    <div class="col-md-10">
                       <b>
                           @switch (Model.Column)
                           {
                               case 1:
                                   <span>A</span>
                                   break;
                               case 2:
                                  <span>B</span>
                                   break;
                               case 3:
                                   if(Model.Type ==0){
                                       if(Model.Level ==0){
                                        <span>C</span>
                                       }
                                       else{
                                         <span>E</span>
                                       }
                                   }
                                   else{
                                       if (Model.Level == 2){
                                        <span>E</span>
                                       }
                                       else if(Model.Level == 1){
                                        <span>D</span>
                                       }
                                       else
                                       {
                                        <span>C</span>
                                       }
                                   }
                                   break;
                               case 4:
                                   if (Model.Type == 0)
                                   {
                                       if (Model.Level == 0)
                                       {
                                        <span>D</span>
                                       }
                                       else
                                       {
                                        <span>F</span>
                                       }
                                   }
                                   else
                                   {
                                       if (Model.Level == 2)
                                       {
                                        <span>F</span>
                                       }
                                       else if(Model.Level ==1)
                                       {
                                        <span>E</span>
                                       }
                                       else 
                                       {
                                        <span>D</span>
                                       }
                                   }
                                   break;
                               case 5:
                                   if (Model.Type == 0)
                                   {
                                       if (Model.Level == 0)
                                       {
                                        <span>E</span>
                                       }
                                       else
                                       {
                                        <span>G</span>
                                       }
                                   }
                                   else
                                   {
                                       if (Model.Level == 2)
                                       {
                                        <span>J</span>
                                       }
                                       else if(Model.Level == 1)
                                       {
                                        <span>F2</span>
                                       }
                                       else 
                                       {
                                        <span>E</span>
                                       }
                                   }
                                   break;
                               case 6:
                                   if (Model.Type == 0)
                                   {
                                       if (Model.Level == 0)
                                       {
                                        <span>F</span>
                                       }
                                       else
                                       {
                                        <span>H</span>
                                       }
                                   }
                                   else
                                   {
                                       if (Model.Level == 2)
                                       {
                                        <span>K</span>
                                       }
                                       else if(Model.Level == 1)
                                       {
                                        <span>J</span>
                                       }
                                       else
                                       {
                                        <span>F</span>
                                       }
                                   }
                                   break;
                               case 7:
                                   if (Model.Type == 0)
                                   {
                                        <span>G</span>
                                   }
                                   else
                                   {
                                       if (Model.Level == 1)
                                       {
                                        <span>K</span>
                                       }
                                       else 
                                       {
                                        <span>G</span>
                                       }
                                   }
                                   break;
                               case 8:
                                   if (Model.Type == 0)
                                   {
                                    <span>H</span>
                                   }
                                   else
                                   {
                                        <span>H</span>
                                   }
                                   break;
                               case 9:
                                    <span>J</span>
                                   break;
                               case 10:
                                    <span>K</span>
                                   break;
                               
                           }
                       </b>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-2">金额</div>
                    <div class="col-md-3">
                        <b>
                            @Html.DisplayFor(model => model.Cost)
                        </b>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <input type="submit" value="购买" class="btn btn-success" />
                    </div>
                </div>
            </div>
        }
    </div>
</div>


